<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改巷道管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-roadway-edit" th:object="${basRoadway}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">巷道编号：</label>
                <div class="col-sm-8">
                    <input name="roadwayId" th:field="*{roadwayId}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">巷道名称：</label>
                <div class="col-sm-8">
                    <input name="roadwayName" th:field="*{roadwayName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在楼层：</label>
                <div class="col-sm-8">
                    <input name="deviceId" th:field="*{deviceId}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入库锁：</label>
                <div class="col-sm-8">
                    <select name="inLocked" class="form-control m-b" th:with="type=${@dict.getType('space_locked')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{inLocked}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出库锁：</label>
                <div class="col-sm-8">
                    <select name="outLocked" class="form-control m-b" th:with="type=${@dict.getType('space_locked')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{outLocked}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "device/roadway";
        $("#form-roadway-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-roadway-edit').serialize());
            }
        }
    </script>
</body>
</html>